ALBANY — Lawmakers on Thursday morning approved a hard-fought measure to cut the retirement benefits for future public employees in New York City and across the state, dealing a defeat to labor unions at the end of a dramatic all-night session.
The pension changes were less drastic than those sought by Gov. Andrew M. Cuomo, applying to fewer employees and saving less money than he had hoped. But they reflect a blow to the state’s public-employee unions, which are enormously powerful in Albany and have been frequent sparring partners for Mr. Cuomo as he has sought to rein in costs.
“This bold and transformational pension reform plan is a historic win for New York taxpayers and municipalities,” Mr. Cuomo said in a statement. “Without this critical reform, New Yorkers would have seen significant tax increases, as well as layoffs to teachers, firefighters and police.”
The pension changes were part of a policy package approved overnight that resolved several of the thorniest issues facing lawmakers this year. Working through the night, the Legislature approved a reconfiguration of the state’s Assembly and Senate districts, the language of a proposed constitutional amendment to legalize casino gambling and the creation of one of the most extensive criminal DNA databases in the nation.
The governor and legislative leaders first allowed the public to see the details of the pension legislation at 3 a.m. Thursday. The Republican-controlled Senate approved the measure an hour later, despite the absence of most of the chamber’s Democrats, who had walked out over redistricting. Democrats argued that the pension vote was invalid because there was no quorum present for the vote; Republicans insisted that a quorum had been met for the pension vote.
The Democrat-controlled Assembly approved the pension changes shortly after 7 a.m. The Assembly speaker, Sheldon Silver, a Manhattan Democrat, had kept the voting open for nearly two hours as he called in lawmakers who had gone to sleep in a tense effort to muster the votes for passage. In the end, the Assembly approved the measure by a comfortable margin.
The pension deal comes as state and local governments around the country take similar steps to reduce retirement costs, often prompting pitched battles with labor unions.
From 2009 to 2011, 43 states enacted major changes to retirement plans for public employees and teachers, according to the National Conference of State Legislatures.
“The message is, the traditional package of retirement benefits has become unaffordable,” said Ronald Snell, a senior fellow at the conference.
Mr. Snell said the deal approved in Albany was similar to measures passed in other states, in that it reduced the benefits offered to some public employees instead of overhauling the structure of the pension system itself.
Mr. Cuomo had significantly scaled back the most contentious portion of his pension proposal, which would have given new public workers the option of forgoing a traditional pension and instead choosing a defined contribution plan, similar to a 401(k). He and lawmakers agreed to offer the defined contribution option, but only to new state workers who earn $75,000 or more and are nonunionized.
In another concession by Mr. Cuomo, the deal did not make significant changes to the retirement benefits of New York City police officers and firefighters.
But state and city officials said the measure would still save more than $80 billion for the state and local governments in the next 30 years — including $21 billion for New York City — by reducing the benefits promised to new workers. For example, the legislation raises the minimum retirement age to 63 from 62 for state workers. It will also require most workers to increase the portion of their salaries that they contribute to the pension system from the current 3 percent to as much as 6 percent for the highest earners.
Reining in ballooning pension costs topped the legislative wish-list for a parade of municipal leaders around the state, including Mayor Michael R. Bloomberg, who said Mr. Cuomo “has got to get an A-plus” for persuading lawmakers to resist pressure from labor unions and approve the changes.
“This is real reform, and for the taxpayers of the state gives them a better deal for their money,” Mr. Bloomberg said in a telephone interview. “It does not hurt any of our current employees or any of our current retirees, and down the road, if people don’t want to come to work for the city or the state, they don’t have to. But I think this is still a phenomenally generous plan.”
Mr. Cuomo’s efforts have infuriated labor leaders. Danny Donohue, the president of the state’s largest union of public workers, the Civil Service Employees Association, said that the pension deal was “shoved down the throat of state legislators fixated on their own self-preservation.”
“This deal is about politicians standing with the 1 percent — the wealthiest New Yorkers — to give them a better break while telling nurses, bus drivers, teachers, secretaries, and laborers to put up and shut up,” Mr. Donohue said after the vote approving the pension changes.
Overnight, lawmakers also approved a proposed constitutional amendment that would allow full-scale commercial casinos. The state has nine racetrack gambling parlors and five American Indian casinos; the amendment, which would have to be approved once more by the Legislature and then by voters, would authorize up to seven Las Vegas-style casinos.
Lawmakers also completed their part of a contentious redistricting compromise with Mr. Cuomo. He had pledged during his campaign for governor not to approve maps unless they were drawn by an independent body, but he reversed his position because, he said, approval of the maps drawn by the Legislature enabled him to get long-term redistricting reform.
In exchange for Mr. Cuomo’s approval of the maps, lawmakers agreed to support a constitutional amendment that would create a bipartisan redistricting commission after the 2020 census. In an effort to ensure that the Legislature follows through with its pledge to approve the constitutional amendment two years in a row, Mr. Cuomo insisted that it pass a law that would grant the governor greater power over redistricting if the Legislature abandoned the amendment.
The Assembly and the Senate approved the lawmaker-drawn maps and the constitutional amendment late Wednesday night, and the backup law early Thursday. The maps approved by the Legislature were for legislative districts only; lawmakers have been unable to agree on how to reduce the number of Congressional districts in the state to 27 from 29 and have left that task to a federal court.
Mr. Cuomo’s compromise on legislative redistricting drew criticism from Senate Democrats, who departed the chamber en masse rather than participate in the vote, held just before midnight. Government watchdog groups are pressing the governor to veto the maps, which they described as gerrymandered to protect incumbents and as unfair to minority voters.
The Senate minority leader, John L. Sampson, a Brooklyn Democrat, questioned whether Mr. Cuomo had dropped his opposition to the redistricting maps in exchange for passage of his pension proposal.
“I would expect this if a Republican was governor,” Mr. Sampson said. He added, “Governor Cuomo always talks about how Albany has changed. Albany hasn’t changed. Albany has changed for the worst.”
Former Mayor Edward I. Koch, who had pressed legislators to pledge during the last election season that they would support independent redistricting, said the deal struck by Mr. Cuomo “puts off reform for a decade and forces the voters to endure 10 more years of the undemocratic way the Legislature’s district lines are drawn.”
“I am disappointed that the governor compromised,” Mr. Koch said.
The DNA database expansion was resolved more amicably. The state now collects DNA from all convicted felons and some misdemeanants; the measure approved by lawmakers will allow it to collect samples from anyone convicted of a crime.
The legislation also attempts to address concerns raised by defense lawyers about wrongful convictions. It allows people convicted of a crime to petition a judge to force the prosecution to turn over all evidence from the case. And it permits defendants to ask a judge to allow testing of DNA samples from that evidence against the state’s database.
Also, people convicted of misdemeanor marijuana possession will not have to give a DNA sample if they have no prior criminal record.
The all-night session in Albany resolved many of the most prominent issues facing the Legislature. Lawmakers have not yet reached an agreement on a state budget for the fiscal year that begins April 1, but legislative leaders have expressed confidence that they would reach a deal within days.